package Using_Custom_Class;

/**
 * @author wly
 * @version V1.0.0
 * @date 2023/1/21 10:27
 */
public class Student {
    private String name;

    public Student(String name){
        this.name = name;
    }

    @Override
    public boolean equals(Object student) {
        if (this == student) return true;
        if (student == null || this.getClass() != student.getClass()) return false;
        Student another = (Student) student;
//        return Objects.equals(name, another.name);
        return this.name.equals(another.name);
    }
}
